function make

mcc -e ...
    soundtrack.m ...
    calibrateSignalsSingleMask.m ...
    checkSignalOverlapsAgainstImages.m ...
    combine2DArraysFromFiles.m ...
    combineSignals.m ...
    computeOverlapGuess.m ...
    computeSignalOverlaps.m ...
    createMissingDirs.m ...
    estimateSoundTrackBounds.m ...
    extractForGUI.m ...
    extractSoundSignals.m ...
    extractSoundWithSoundOverlapsTest.m ...
    findBestFitToSignal.m ...
    findMinRelativeDifference.m ...
    fitReduceFitSignal.m ...
    generateOutputDirectory.m ...
    getAllSoundSignals.m ...
    getFileSequenceFromRepresetative.m ...
    getRelevantSystemInfo ...
    getSizeOf2DArrayFromFile.m ...
    getSoundTrackBounds.m ...
    getSoundTrackBoundsManually.m ...
    imagesAndAudioToMovie.m ...
    imagesToVideo.m ...
    interpretInputArguments.m ...
    partitionFileName.m ...
    playMovie.m ...
    playSound.m ...
    read2DArrayFromFile.m ...
    readImageByIndex.m ...
    readImageFile.m ...
    readdpx.m ...
    saveSound.m ...
    setGlobalVariables.m ...
    setWaitbar.m ...
    testRename.m ...
    tidyLogFile.m ...
    usclogo.m ...
    visualizeOverlapGuess.m ...
    visualizeOverlaps.m ...
    visualizeSoundCalibrationSingleMask.m ...
    write2DArrayToFile.m ...
    writeToLogFile.m ...
    -o 'aeolight'


% Set the file where the version number is to be searched for.
filename = 'soundtrack.m';
% Define the test strings used to identify the line defining the version
% number.
testStr1 = 'versionStr =';
testStr2 = 'versionStr=';

% Open the file "soundtrack.m" for reading.
fid = fopen(filename, 'r');
% Get the first line of the file.
currLine = fgetl(fid);
% Find the first instance of a line starting with one of the test strings.
while ischar(currLine)
    if ( ((numel(currLine) > numel(testStr1))&&(strcmp(testStr1, currLine(1:numel(testStr1))) == true)) ...
            ||((numel(currLine) > numel(testStr2))&&(strcmp(testStr2, currLine(1:numel(testStr2))) == true)) )
        break;
    else
        % Get the next line.
        currLine = fgetl(fid);
    end
end
% From the current line extract the version as the first string in single
% quotes.
startArr = regexp(currLine, '''');
if (numel(startArr) == 2)
    versionStr = currLine((startArr(1) + 1):(startArr(2) - 1));
else
    fprintf(1, 'Could not determine the version number from the file %s in the current directory.', filename);
    versionStr = '0.0';
end

% Rename the executable reflecting the version number in the new name.
movefile('aeolight.exe', ['aeolight_v' versionStr '.exe'], 'f');

return;
% end of the function "make"
